3 /**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
7 * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 * for The ALICE HLT Project. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
19 /** @file AliHLTRootFilePublisherComponent.cxx
20 @author Matthias Richter
22 @brief HLT file publisher component implementation. */
24 #include "AliHLTRootFilePublisherComponent.h"
25 //#include <TObjString.h>
32 /** the global object for component registration */
33 AliHLTRootFilePublisherComponent gAliHLTRootFilePublisherComponent;
35 /** ROOT macro for the implementation of ROOT specific class methods */
36 ClassImp(AliHLTRootFilePublisherComponent)
38 AliHLTRootFilePublisherComponent::AliHLTRootFilePublisherComponent()
42 // see header file for class documentation
44 // refer to README to build package
46 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
50 AliHLTRootFilePublisherComponent::AliHLTRootFilePublisherComponent(const AliHLTRootFilePublisherComponent&)
54 // see header file for class documentation
55 HLTFatal("copy constructor untested");
58 AliHLTRootFilePublisherComponent& AliHLTRootFilePublisherComponent::operator=(const AliHLTRootFilePublisherComponent&)
60 // see header file for class documentation
61 HLTFatal("assignment operator untested");
65 AliHLTRootFilePublisherComponent::~AliHLTRootFilePublisherComponent()
67 // see header file for class documentation
69 // file list and file name list are owner of their objects and
70 // delete all the objects
73 const char* AliHLTRootFilePublisherComponent::GetComponentID()
75 // see header file for class documentation
76 return "ROOTFilePublisher";
79 AliHLTComponentDataType AliHLTRootFilePublisherComponent::GetOutputDataType()
81 // see header file for class documentation
82 AliHLTComponentDataType dt =
83 {sizeof(AliHLTComponentDataType),
84 kAliHLTVoidDataTypeID,
85 kAliHLTVoidDataOrigin};
89 void AliHLTRootFilePublisherComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
91 // see header file for class documentation
96 AliHLTComponent* AliHLTRootFilePublisherComponent::Spawn()
98 // see header file for class documentation
99 return new AliHLTRootFilePublisherComponent;
102 int AliHLTRootFilePublisherComponent::ScanArgument(int argc, const char** argv)
104 // see header file for class documentation
106 // there are no other arguments than the standard ones
107 if (argc==0 && argv==NULL) {
108 // this is just to get rid of the warning "unused parameter"
114 int AliHLTRootFilePublisherComponent::OpenFiles()
116 // see header file for class documentation
121 int AliHLTRootFilePublisherComponent::GetEvent( const AliHLTComponentEventData& evtData,
122 AliHLTComponentTriggerData& trigData,
123 AliHLTUInt8_t* outputPtr,
124 AliHLTUInt32_t& size,
125 vector<AliHLTComponentBlockData>& outputBlocks )
128 if (GetCurrentSpecification()==0) {
129 TH1F *hpx = new TH1F("hpx","px distribution",100,-4,4);
130 hpx->FillRandom("gaus",1000);
131 PushBack(hpx, "TH1F", "ROOT");
134 TH1F *hpy = new TH1F("hpy","py distribution",100,-10,10);
135 hpy->FillRandom("gaus",10000);
136 PushBack(hpy, "TH1F", "ROOT");