1 //**************************************************************************
2 //* This file is property of and copyright by the ALICE HLT Project *
3 //* ALICE Experiment at CERN, All rights reserved. *
5 //* Primary Authors: Kenneth Aamodt, Sergey Gorbunov *
6 //* for The ALICE HLT Project. *
8 //* Permission to use, copy, modify and distribute this software and its *
9 //* documentation strictly for non-commercial purposes is hereby granted *
10 //* without fee, provided that the above copyright notice appears in all *
11 //* copies and that both the copyright notice and this permission notice *
12 //* appear in the supporting documentation. The authors make no claims *
13 //* about the suitability of this software for any purpose. It is *
14 //* provided "as is" without express or implied warranty. *
15 //**************************************************************************
17 /** @file AliHLTITSDigitPublisherComponent.cxx
18 @author Kenneth Aamodt, Sergey Gorbunov
20 @brief Component to run offline clusterfinders
29 #include "AliHLTITSDigitPublisherComponent.h"
31 #include "AliRunLoader.h"
32 #include "AliGeomManager.h"
33 #include "AliITSInitGeometry.h"
34 #include "AliITSLoader.h"
35 #include "AliCDBManager.h"
38 #include "TObjArray.h"
39 #include "TClonesArray.h"
40 /** ROOT macro for the implementation of ROOT specific class methods */
41 ClassImp(AliHLTITSDigitPublisherComponent);
43 AliHLTITSDigitPublisherComponent::AliHLTITSDigitPublisherComponent()
51 // see header file for class documentation
53 // refer to README to build package
55 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
58 AliHLTITSDigitPublisherComponent::~AliHLTITSDigitPublisherComponent() {
59 // see header file for class documentation
62 // Public functions to implement AliHLTComponent's interface.
63 // These functions are required for the registration process
65 const char* AliHLTITSDigitPublisherComponent::GetComponentID()
67 // see header file for class documentation
68 return "ITSDigitPublisher";
71 void AliHLTITSDigitPublisherComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) {
72 // see header file for class documentation
74 //list.push_back( ???? | ???? );
77 AliHLTComponentDataType AliHLTITSDigitPublisherComponent::GetOutputDataType() {
78 // see header file for class documentation
80 return kAliHLTDataTypeTTree|kAliHLTDataOriginITS;
83 void AliHLTITSDigitPublisherComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) {
84 // see header file for class documentation
86 inputMultiplier = 1000;
89 AliHLTComponent* AliHLTITSDigitPublisherComponent::Spawn() {
90 // see header file for class documentation
91 return new AliHLTITSDigitPublisherComponent();
94 Int_t AliHLTITSDigitPublisherComponent::DoInit( int /*argc*/, const char** /*argv*/ ) {
95 // see header file for class documentation
97 if(AliGeomManager::GetGeometry()==NULL){
98 AliGeomManager::LoadGeometry();
101 fRunLoader = GetRunLoader();//AliRunLoader::Open("galice.root");
103 HLTFatal("No RunLoader found");
106 fITSLoader = (AliITSLoader *)(fRunLoader->GetLoader("ITSLoader"));
108 HLTFatal("No ITS RunLoader found");
111 fNumberOfEvents = fRunLoader->GetNumberOfEvents();
116 Int_t AliHLTITSDigitPublisherComponent::DoDeinit() {
117 // see header file for class documentation
122 Int_t AliHLTITSDigitPublisherComponent::GetEvent(const AliHLTComponentEventData& /*evtData*/,AliHLTComponentTriggerData& /*trigData*/)
124 // see header file for class documentation
125 if (!IsDataEvent()) return 0;
127 fRunLoader->GetEvent(fEventNumber);
128 fITSLoader->LoadDigits("read");
129 tD = fITSLoader->TreeD();
131 HLTFatal("No Digit Tree found");
134 //tD->GetEntry(fEventNumber);
136 PushBack((TObject*)tD,kAliHLTDataTypeTTree|kAliHLTDataOriginITS,0x00000000);