3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7 * for The ALICE Off-line Project. *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
18 /** @file AliHLTRootFilePublisherComponent.cxx
19 @author Matthias Richter
21 @brief HLT file publisher component implementation. */
23 #include "AliHLTRootFilePublisherComponent.h"
24 //#include <TObjString.h>
31 /** the global object for component registration */
32 AliHLTRootFilePublisherComponent gAliHLTRootFilePublisherComponent;
34 /** ROOT macro for the implementation of ROOT specific class methods */
35 ClassImp(AliHLTRootFilePublisherComponent)
37 AliHLTRootFilePublisherComponent::AliHLTRootFilePublisherComponent()
41 // see header file for class documentation
43 // refer to README to build package
45 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
49 AliHLTRootFilePublisherComponent::AliHLTRootFilePublisherComponent(const AliHLTRootFilePublisherComponent&)
53 // see header file for class documentation
54 HLTFatal("copy constructor untested");
57 AliHLTRootFilePublisherComponent& AliHLTRootFilePublisherComponent::operator=(const AliHLTRootFilePublisherComponent&)
59 // see header file for class documentation
60 HLTFatal("assignment operator untested");
64 AliHLTRootFilePublisherComponent::~AliHLTRootFilePublisherComponent()
66 // see header file for class documentation
68 // file list and file name list are owner of their objects and
69 // delete all the objects
72 const char* AliHLTRootFilePublisherComponent::GetComponentID()
74 // see header file for class documentation
75 return "ROOTFilePublisher";
78 AliHLTComponentDataType AliHLTRootFilePublisherComponent::GetOutputDataType()
80 // see header file for class documentation
81 AliHLTComponentDataType dt =
82 {sizeof(AliHLTComponentDataType),
83 kAliHLTVoidDataTypeID,
84 kAliHLTVoidDataOrigin};
88 void AliHLTRootFilePublisherComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
90 // see header file for class documentation
95 AliHLTComponent* AliHLTRootFilePublisherComponent::Spawn()
97 // see header file for class documentation
98 return new AliHLTRootFilePublisherComponent;
101 int AliHLTRootFilePublisherComponent::ScanArgument(int argc, const char** argv)
103 // see header file for class documentation
105 // there are no other arguments than the standard ones
106 if (argc==0 && argv==NULL) {
107 // this is just to get rid of the warning "unused parameter"
113 int AliHLTRootFilePublisherComponent::OpenFiles()
115 // see header file for class documentation
120 int AliHLTRootFilePublisherComponent::GetEvent( const AliHLTComponentEventData& evtData,
121 AliHLTComponentTriggerData& trigData,
122 AliHLTUInt8_t* outputPtr,
123 AliHLTUInt32_t& size,
124 vector<AliHLTComponentBlockData>& outputBlocks )
127 if (GetCurrentSpecification()==0) {
128 TH1F *hpx = new TH1F("hpx","px distribution",100,-4,4);
129 hpx->FillRandom("gaus",1000);
130 PushBack(hpx, "TH1F", "ROOT");
132 TH1F *hpy = new TH1F("hpy","py distribution",100,-10,10);
133 hpy->FillRandom("gaus",10000);
134 PushBack(hpy, "TH1F", "ROOT");