]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TRD/AliHLTTRDOfflineTrackerV1Component.cxx
bugfixes by Theodor and Raphaelle
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDOfflineTrackerV1Component.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   AliHLTTRDOfflineTrackerV1Component.cxx
20     @author 
21     @date   2009-08-31
22     @brief  A TRDClusterizer processing component for the HLT. 
23 */
24
25 #include "AliHLTTRDOfflineTrackerV1Component.h"
26 #include "AliCDBManager.h"
27
28 ClassImp(AliHLTTRDOfflineTrackerV1Component)
29     
30 AliHLTTRDOfflineTrackerV1Component::AliHLTTRDOfflineTrackerV1Component():
31   AliHLTTRDTrackerV1Component()
32 {
33   // Default constructor
34
35 }
36
37 AliHLTTRDOfflineTrackerV1Component::~AliHLTTRDOfflineTrackerV1Component()
38 {
39   // Destructor
40   // Work is Done in DoDeInit()
41 }
42
43 AliHLTComponent* AliHLTTRDOfflineTrackerV1Component::Spawn()
44 {
45   // Spawn function, return new instance of this class
46   return new AliHLTTRDOfflineTrackerV1Component;
47 };
48
49 int AliHLTTRDOfflineTrackerV1Component::DoInit( int argc, const char** argv )
50 {
51   SetOfflineParams();
52   return AliHLTTRDTrackerV1Component::DoInit(argc, argv);
53 }
54
55 const char* AliHLTTRDOfflineTrackerV1Component::GetComponentID()
56 {
57   // Return the component ID const char *
58   return "TRDOfflineTrackerV1"; // The ID of this component
59 }
60
61 void AliHLTTRDOfflineTrackerV1Component::SetOfflineParams(){
62   HLTFatal("You have entered the OFFLINE configuration!");
63   HLTFatal("This program shall NOT run on the HLT cluster like this!");
64   if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
65     HLTFatal("You are resetting the Default Storage of the CDBManager!");
66     HLTFatal("Let's hope that this program is NOT running on the HLT cluster!");
67     AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
68   }else{
69     HLTError("DefaultStorage was already set!");
70   }
71   if(AliCDBManager::Instance()->GetRun()<0){
72     HLTFatal("You are resetting the CDB run number to 0!");
73     HLTFatal("Let's hope that this program is NOT running on the HLT cluster!");
74     AliCDBManager::Instance()->SetRun(0);
75   }else{
76     HLTError("Run Number was already set!");
77   }
78 }
79
80 int AliHLTTRDOfflineTrackerV1Component::DoDeinit()
81 {
82   return AliHLTTRDTrackerV1Component::DoDeinit();
83 }
84
85 int AliHLTTRDOfflineTrackerV1Component::DoEvent(const AliHLTComponent_EventData& evtData, const AliHLTComponent_BlockData* blocks, 
86                                                   AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr, 
87                                                   AliHLTUInt32_t& size, vector<AliHLTComponent_BlockData>& outputBlocks )
88 {
89   return AliHLTTRDTrackerV1Component::DoEvent(evtData, blocks, trigData, outputPtr, size, outputBlocks );
90 }
91