]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
adding skeleton for calibration component generating the HLT RecoParam from the onlin...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Oct 2010 07:55:17 +0000 (07:55 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Oct 2010 07:55:17 +0000 (07:55 +0000)
HLT/BASE/util/AliHLTAgentUtil.cxx
HLT/BASE/util/AliHLTRecoParamComponent.cxx [new file with mode: 0644]
HLT/BASE/util/AliHLTRecoParamComponent.h [new file with mode: 0644]
HLT/libAliHLTUtil.pkg

index 8dc19419a170815d4da0759ab6c374c7446f4d43..fb2e5059476fddbde5334d3ba81c254166d0520b 100644 (file)
@@ -34,6 +34,7 @@
 #include "AliHLTRootFileWriterComponent.h"
 #include "AliHLTRootFilePublisherComponent.h"
 #include "AliHLTRootSchemaEvolutionComponent.h"
+#include "AliHLTRecoParamComponent.h"
 //#include "AliHLTMCGeneratorComponent.h"
 #include "AliHLTESDMCEventPublisherComponent.h"
 #include "AliHLTFileWriter.h"
@@ -118,6 +119,7 @@ int AliHLTAgentUtil::RegisterComponents(AliHLTComponentHandler* pHandler) const
   pHandler->AddComponent(new AliHLTRootFileWriterComponent);
   pHandler->AddComponent(new AliHLTRootFilePublisherComponent);
   pHandler->AddComponent(new AliHLTRootSchemaEvolutionComponent);
+  pHandler->AddComponent(new AliHLTRecoParamComponent);
   //  pHandler->AddComponent(new AliHLTMCGeneratorComponent);
   pHandler->AddComponent(new AliHLTESDMCEventPublisherComponent);
   pHandler->AddComponent(new AliHLTFileWriter);
diff --git a/HLT/BASE/util/AliHLTRecoParamComponent.cxx b/HLT/BASE/util/AliHLTRecoParamComponent.cxx
new file mode 100644 (file)
index 0000000..85fc6bf
--- /dev/null
@@ -0,0 +1,120 @@
+// $Id$
+
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//*                                                                        *
+//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
+//*                  for The ALICE HLT Project.                            *
+//*                                                                        *
+//* Permission to use, copy, modify and distribute this software and its   *
+//* documentation strictly for non-commercial purposes is hereby granted   *
+//* without fee, provided that the above copyright notice appears in all   *
+//* copies and that both the copyright notice and this permission notice   *
+//* appear in the supporting documentation. The authors make no claims     *
+//* about the suitability of this software for any purpose. It is          *
+//* provided "as is" without express or implied warranty.                  *
+//**************************************************************************
+
+/// @file   AliHLTRecoParamComponent.cxx
+/// @author Matthias Richter
+/// @date   2010-10-18
+/// @brief  Online HLT RecoParam generator component
+///
+
+#include "AliHLTRecoParamComponent.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTRecoParamComponent)
+
+AliHLTRecoParamComponent::AliHLTRecoParamComponent()
+  : AliHLTCalibrationProcessor()
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+}
+
+AliHLTRecoParamComponent::~AliHLTRecoParamComponent()
+{
+  // see header file for class documentation
+}
+
+void AliHLTRecoParamComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
+{
+  // see header file for class documentation
+  list.push_back(kAliHLTAnyDataType);
+}
+
+AliHLTComponentDataType AliHLTRecoParamComponent::GetOutputDataType()
+{
+  // see header file for class documentation
+  return kAliHLTDataTypeFXSCalib;
+}
+
+void AliHLTRecoParamComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
+{
+  // see header file for class documentation
+
+  // this is nothing more than an assumption, in fact it's very difficult to predict how
+  // much output the component produces
+  constBase=100*1024;
+  inputMultiplier=1;
+}
+
+void AliHLTRecoParamComponent::GetOCDBObjectDescription( TMap* const /*targetArray*/)
+{
+  // see header file for class documentation
+}
+
+int AliHLTRecoParamComponent::InitCalibration()
+{
+  // see header file for class documentation
+
+  int iResult=0;
+
+  return 0;
+}
+
+int AliHLTRecoParamComponent::DeinitCalibration()
+{
+  // see header file for class documentation
+
+  return 0;
+}
+
+int AliHLTRecoParamComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/,
+                                                           AliHLTComponentTriggerData& /*trigData*/ )
+{
+  // see header file for class documentation
+  int iResult=0;
+
+  return iResult;
+}
+
+int AliHLTRecoParamComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/,
+                                                      AliHLTComponentTriggerData& /*trigData*/)
+{
+  // see header file for class documentation
+
+  return 0;
+}
+
+int AliHLTRecoParamComponent::ScanConfigurationArgument(int argc, const char** argv)
+{
+  // see header file for class documentation
+  int iResult=0;
+  if (argc<=0) return 0;
+  int i=0;
+  TString argument=argv[i];
+
+  // -firstarg
+  if (argument.Contains("-firstarg")) {
+    return 1;
+  }
+
+  return iResult;
+}
diff --git a/HLT/BASE/util/AliHLTRecoParamComponent.h b/HLT/BASE/util/AliHLTRecoParamComponent.h
new file mode 100644 (file)
index 0000000..66f0f63
--- /dev/null
@@ -0,0 +1,117 @@
+// -*- Mode: C++ -*-
+// $Id$
+
+#ifndef ALIHLTRECOPARAMCOMPONENT_H
+#define ALIHLTRECOPARAMCOMPONENT_H
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//* See cxx source for full Copyright notice                               *
+
+/// @file   AliHLTRecoParamComponent.h
+/// @author Matthias Richter
+/// @date   2010-10-18
+/// @brief  Online HLT RecoParam generator component
+///
+
+#include "AliHLTCalibrationProcessor.h"
+
+/**
+ * @class AliHLTRecoParamComponent
+ * Collects online configuration info and in the future other parameters
+ * and produces the corresponding calibration object for reconstruction of HLT.
+ *
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b RecoParamGenerator                                  <br>
+ * Library: \b libAliHLTUtil.so                                                <br>
+ * Input Data Types: ::kAliHLTAnyDataType                              <br>
+ * Output Data Types: none                                             <br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *      
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * Configuration by component arguments.
+ *
+ * <h2>Default CDB entries:</h2>
+ * The component loads no CDB entries.
+ *
+ * <h2>Performance:</h2>
+ * The component does not process any event data.
+ *
+ * <h2>Memory consumption:</h2>
+ * The component does not process any event data.
+ *
+ * <h2>Output size:</h2>
+ * Depending on the mode.
+ *
+ * @ingroup alihlt_util_components
+ */
+class AliHLTRecoParamComponent : public AliHLTCalibrationProcessor
+{
+ public:
+  /// standard constructor
+  AliHLTRecoParamComponent();
+  /// destructor
+  virtual ~AliHLTRecoParamComponent();
+
+  /// inherited from AliHLTComponent: return id of the component.
+  virtual const char* GetComponentID() {return "RecoParamGenerator";};
+  /// inherited from AliHLTComponent: input data types
+  virtual void GetInputDataTypes(AliHLTComponentDataTypeList&);
+  /// inherited from AliHLTComponent: output data types
+  virtual AliHLTComponentDataType GetOutputDataType();
+  /// inherited from AliHLTComponent: output data size
+  virtual void GetOutputDataSize(unsigned long&, double&);
+  /// inherited from AliHLTComponent: description of required CDB objects
+  void GetOCDBObjectDescription( TMap* const targetArray);
+
+  /// inherited from AliHLTComponent: spawn function, create an instance.
+  virtual AliHLTComponent* Spawn() {return new AliHLTRecoParamComponent;}
+
+ protected:
+  /// inherited from AliHLTCalibrationProcessor: custom initialization
+  int InitCalibration();
+  /// inherited from AliHLTCalibrationProcessor: custom argument scan
+  /// the AliHLTCalibrationProcessor so far does not use the base class
+  /// methods for argument scan.
+  int ScanArgument( int argc, const char** argv ) {
+    int result=ScanConfigurationArgument(argc, argv); return result>0?result-1:result;
+  }
+  /// inherited from AliHLTCalibrationProcessor: cleanup
+  int DeinitCalibration();
+
+  /// inherited from AliHLTCalibrationProcessor processing
+  virtual int ProcessCalibration( const AliHLTComponentEventData& evtData,
+                                 AliHLTComponentTriggerData& trigData );
+  
+  using AliHLTCalibrationProcessor::ProcessCalibration;
+
+  /// inherited from AliHLTCalibrationProcessor processing
+  int ShipDataToFXS( const AliHLTComponentEventData& evtData,
+                    AliHLTComponentTriggerData& trigData);
+
+  using AliHLTCalibrationProcessor::ShipDataToFXS;
+
+  /**
+   * Inherited from AliHLTComponent
+   * Scan one argument and adjacent parameters.
+   * @return number of scanned parameters, neg. error code if failed
+   */
+  virtual int ScanConfigurationArgument(int argc, const char** argv);
+
+private:
+  /** copy constructor prohibited */
+  AliHLTRecoParamComponent(const AliHLTRecoParamComponent&);
+  /** assignment operator prohibited */
+  AliHLTRecoParamComponent& operator=(const AliHLTRecoParamComponent&);
+
+  static const char* fgkConfigurationObject; //! configuration object
+
+  ClassDef(AliHLTRecoParamComponent, 0) // Online HLT RecoParam generator component
+};
+#endif
index b6961b715bcf3d3189283d3a6b60ac7e71f4fca2..216b305866eb3b1f4f41d20a7751659e018c9e7e 100644 (file)
@@ -10,6 +10,7 @@ CLASS_HDRS:=          AliHLTFilePublisher.h \
                AliHLTRootFileWriterComponent.h \
                AliHLTRootFileStreamerComponent.h \
                AliHLTRootSchemaEvolutionComponent.h \
+               AliHLTRecoParamComponent.h \
                AliHLTLoaderPublisherComponent.h \
                AliHLTRawReaderPublisherComponent.h \
                AliHLTOUTPublisherComponent.h \