2 //**************************************************************************
3 //* This file is property of and copyright by the ALICE HLT Project *
4 //* ALICE Experiment at CERN, All rights reserved. *
6 //* Primary Authors: Kenneth Aamodt, Sergey Gorbunov *
7 //* for The ALICE HLT 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 AliHLTITSDigitPublisherComponent.cxx
19 @author Kenneth Aamodt, Sergey Gorbunov
21 @brief Component to run offline clusterfinders
30 #include "AliHLTITSDigitPublisherComponent.h"
32 #include "AliRunLoader.h"
33 #include "AliGeomManager.h"
34 #include "AliITSInitGeometry.h"
35 #include "AliITSLoader.h"
36 #include "AliCDBManager.h"
39 #include "TObjArray.h"
40 #include "TClonesArray.h"
41 /** ROOT macro for the implementation of ROOT specific class methods */
42 ClassImp(AliHLTITSDigitPublisherComponent);
44 AliHLTITSDigitPublisherComponent::AliHLTITSDigitPublisherComponent()
52 // see header file for class documentation
54 // refer to README to build package
56 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
59 AliHLTITSDigitPublisherComponent::~AliHLTITSDigitPublisherComponent() {
60 // see header file for class documentation
63 // Public functions to implement AliHLTComponent's interface.
64 // These functions are required for the registration process
66 const char* AliHLTITSDigitPublisherComponent::GetComponentID()
68 // see header file for class documentation
69 return "ITSDigitPublisher";
72 void AliHLTITSDigitPublisherComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) {
73 // see header file for class documentation
75 //list.push_back( ???? | ???? );
78 AliHLTComponentDataType AliHLTITSDigitPublisherComponent::GetOutputDataType() {
79 // see header file for class documentation
81 return kAliHLTDataTypeAliTreeD|kAliHLTDataOriginITS;
84 void AliHLTITSDigitPublisherComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) {
85 // see header file for class documentation
87 inputMultiplier = 1000;
90 AliHLTComponent* AliHLTITSDigitPublisherComponent::Spawn() {
91 // see header file for class documentation
92 return new AliHLTITSDigitPublisherComponent();
95 Int_t AliHLTITSDigitPublisherComponent::DoInit( int /*argc*/, const char** /*argv*/ ) {
96 // see header file for class documentation
98 if(AliGeomManager::GetGeometry()==NULL){
99 AliGeomManager::LoadGeometry();
102 fRunLoader = GetRunLoader();//AliRunLoader::Open("galice.root");
104 HLTFatal("No RunLoader found");
107 fITSLoader = (AliITSLoader *)(fRunLoader->GetLoader("ITSLoader"));
109 HLTFatal("No ITS RunLoader found");
112 fNumberOfEvents = fRunLoader->GetNumberOfEvents();
117 Int_t AliHLTITSDigitPublisherComponent::DoDeinit() {
118 // see header file for class documentation
123 Int_t AliHLTITSDigitPublisherComponent::GetEvent(const AliHLTComponentEventData& /*evtData*/,AliHLTComponentTriggerData& /*trigData*/)
125 // see header file for class documentation
126 if (!IsDataEvent()) return 0;
128 fRunLoader->GetEvent(fEventNumber);
129 fITSLoader->LoadDigits("read");
130 tD = fITSLoader->TreeD();
132 HLTFatal("No Digit Tree found");
135 //tD->GetEntry(fEventNumber);
137 PushBack((TObject*)tD,kAliHLTDataTypeAliTreeD|kAliHLTDataOriginITS,0x00000000);