3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* for The ALICE HLT Project. *
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 //**************************************************************************
19 /** @file AliHLTGlobalDCSPublisherComponent.cxx
20 @author Matthias Richter
22 @brief DIM publisher component for global HLT data
25 #include "AliHLTGlobalDCSPublisherComponent.h"
26 #include "AliHLTDimServer.h"
28 /** ROOT macro for the implementation of ROOT specific class methods */
29 ClassImp(AliHLTGlobalDCSPublisherComponent)
31 AliHLTGlobalDCSPublisherComponent::AliHLTGlobalDCSPublisherComponent()
35 // see header file for class documentation
37 // refer to README to build package
39 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
42 AliHLTGlobalDCSPublisherComponent::~AliHLTGlobalDCSPublisherComponent()
44 // see header file for class documentation
46 // file list and file name list are owner of their objects and
47 // delete all the objects
50 const char* AliHLTGlobalDCSPublisherComponent::GetComponentID()
52 // see header file for class documentation
53 return "DCSPublisher";
56 void AliHLTGlobalDCSPublisherComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
58 // see header file for class documentation
60 list.push_back(kAliHLTAnyDataType);
63 AliHLTComponent* AliHLTGlobalDCSPublisherComponent::Spawn()
65 // see header file for class documentation
66 return new AliHLTGlobalDCSPublisherComponent;
69 int AliHLTGlobalDCSPublisherComponent::DoInit( int argc, const char** argv )
71 // see header file for class documentation
73 iResult=ConfigureFromArgumentString(argc, argv);
78 int AliHLTGlobalDCSPublisherComponent::ScanConfigurationArgument(int argc, const char** argv)
80 // see header file for class documentation
84 if (argc==0) return 0;
86 const char* serverName=NULL;
87 const char* dimdns=NULL;
88 TString argument=argv[0];
89 if (argument.CompareTo("-servername")==0) {
90 if (++i>=argc) return -EPROTO;
94 } else if (argument.BeginsWith("-dimdns")) {
95 if (++i>=argc) return -EPROTO;
102 fpServer=new AliHLTDimServer(serverName);
103 if (!fpServer) return -ENOMEM;
104 if ((iResult=fpServer->Init(dimdns))>=0) {
107 iResult=fpServer->Start();
113 int AliHLTGlobalDCSPublisherComponent::DoDeinit()
115 // see header file for class documentation
117 if (!fpServer) return -ENODEV;
125 int AliHLTGlobalDCSPublisherComponent::DumpEvent( const AliHLTComponentEventData& /*evtData*/,
126 AliHLTComponentTriggerData& /*trigData*/ )
128 // see header file for class documentation