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 /** ROOT macro for the implementation of ROOT specific class methods */
33 ClassImp(AliHLTRootFilePublisherComponent)
35 AliHLTRootFilePublisherComponent::AliHLTRootFilePublisherComponent()
39 // see header file for class documentation
41 // refer to README to build package
43 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
47 AliHLTRootFilePublisherComponent::~AliHLTRootFilePublisherComponent()
49 // see header file for class documentation
51 // file list and file name list are owner of their objects and
52 // delete all the objects
55 const char* AliHLTRootFilePublisherComponent::GetComponentID()
57 // see header file for class documentation
58 return "ROOTFilePublisher";
61 AliHLTComponentDataType AliHLTRootFilePublisherComponent::GetOutputDataType()
63 // see header file for class documentation
64 AliHLTComponentDataType dt =
65 {sizeof(AliHLTComponentDataType),
66 kAliHLTVoidDataTypeID,
67 kAliHLTVoidDataOrigin};
71 void AliHLTRootFilePublisherComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
73 // see header file for class documentation
78 AliHLTComponent* AliHLTRootFilePublisherComponent::Spawn()
80 // see header file for class documentation
81 return new AliHLTRootFilePublisherComponent;
84 int AliHLTRootFilePublisherComponent::ScanArgument(int argc, const char** argv)
86 // see header file for class documentation
88 // there are no other arguments than the standard ones
89 if (argc==0 && argv==NULL) {
90 // this is just to get rid of the warning "unused parameter"
96 int AliHLTRootFilePublisherComponent::OpenFiles()
98 // see header file for class documentation
103 int AliHLTRootFilePublisherComponent::GetEvent( const AliHLTComponentEventData& /*evtData*/,
104 AliHLTComponentTriggerData& /*trigData*/,
105 AliHLTUInt8_t* /*outputPtr*/,
106 AliHLTUInt32_t& /*size*/,
107 vector<AliHLTComponentBlockData>& /*outputBlocks*/ )
109 // see header file for class documentation
111 if (GetEventCount()%2==0) {
112 TH1F *hpx = new TH1F("hpx","px distribution",100,-4,4);
113 hpx->FillRandom("gaus",1000);
114 PushBack(hpx, "TH1F", "ROOT");
117 TH1F *hpy = new TH1F("hpy","py distribution",100,-10,10);
118 hpy->FillRandom("gaus",10000);
119 PushBack(hpy, "TH1F", "ROOT");