]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TRD/AliHLTTRDOfflineClusterizerComponent.cxx
- adopt to offline changes in the recoParam (Theodor)
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDOfflineClusterizerComponent.cxx
1 // $Id$
2
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //*                                                                        *
7 //* Primary Authors:                                                       *
8 //*                  for The ALICE HLT Project.                            *
9 //*                                                                        *
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 //**************************************************************************
18
19 /** @file   AliHLTTRDOfflineClusterizerComponent.cxx
20     @author 
21     @date   
22     @brief  
23 */
24
25 // see header file for class documentation                                   //
26 // or                                                                        //
27 // refer to README to build package                                          //
28 // or                                                                        //
29 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt                          //
30
31 #include "AliHLTTRDOfflineClusterizerComponent.h"
32 #include "AliCDBManager.h"
33
34 ClassImp(AliHLTTRDOfflineClusterizerComponent)
35    
36 AliHLTTRDOfflineClusterizerComponent::AliHLTTRDOfflineClusterizerComponent():
37   AliHLTTRDClusterizerComponent()
38 {
39   // Default constructor
40
41 }
42
43 AliHLTTRDOfflineClusterizerComponent::~AliHLTTRDOfflineClusterizerComponent()
44 {
45   // Destructor
46   // Work is Done in DoDeInit()
47 }
48
49 AliHLTComponent* AliHLTTRDOfflineClusterizerComponent::Spawn()
50 {
51   // Spawn function, return new instance of this class
52   return new AliHLTTRDOfflineClusterizerComponent;
53 };
54
55 const char* AliHLTTRDOfflineClusterizerComponent::GetComponentID()
56 {
57   // Return the component ID const char *
58   return "TRDOfflineClusterizer"; // The ID of this component
59 }
60
61 int AliHLTTRDOfflineClusterizerComponent::DoInit( int argc, const char** argv )
62 {
63   SetOfflineParams();
64   return AliHLTTRDClusterizerComponent::DoInit(argc, argv);
65 }
66
67 void AliHLTTRDOfflineClusterizerComponent::SetOfflineParams(){
68   HLTFatal("You have entered the OFFLINE configuration!");
69   HLTFatal("This program shall NOT run on the HLT cluster like this!");
70   if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
71     HLTFatal("You are resetting the Default Storage of the CDBManager!");
72     HLTFatal("Let's hope that this program is NOT running on the HLT cluster!");
73     AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
74   }else{
75     HLTError("DefaultStorage was already set!");
76   }
77   if(AliCDBManager::Instance()->GetRun()<0){
78     HLTFatal("You are resetting the CDB run number to 0!");
79     HLTFatal("Let's hope that this program is NOT running on the HLT cluster!");
80     AliCDBManager::Instance()->SetRun(0);
81   }else{
82     HLTError("Run Number was already set!");
83   }
84 }
85
86 int AliHLTTRDOfflineClusterizerComponent::DoDeinit()
87 {
88   return AliHLTTRDClusterizerComponent::DoDeinit();
89 }
90
91 int AliHLTTRDOfflineClusterizerComponent::DoEvent(const AliHLTComponent_EventData& evtData, const AliHLTComponent_BlockData* blocks, 
92                                                   AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr, 
93                                                   AliHLTUInt32_t& size, vector<AliHLTComponent_BlockData>& outputBlocks )
94 {
95   return AliHLTTRDClusterizerComponent::DoEvent(evtData, blocks, trigData, outputPtr, size, outputBlocks );
96 }
97