]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- adding new component for the new clusterizer.
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Aug 2010 12:07:04 +0000 (12:07 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Aug 2010 12:07:04 +0000 (12:07 +0000)
HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx
HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSLinkDef.h

index 251b7d91f36aa87a6a8fb1fdfeea0b434dcd45ee..d4254652f837ba588e29027646369cc79a8cd4eb 100644 (file)
@@ -39,6 +39,7 @@
 #include "AliHLTCaloDefinitions.h"
 #include "AliHLTPHOSGeometry.h"
 #include "AliHLTPHOSRecoParamHandler.h"
+#include "AliHLTCaloClusterizer.h"
 
 AliHLTPHOSClusterizerComponent gAliHLTPHOSClusterizerComponent;
 
@@ -100,6 +101,8 @@ AliHLTPHOSClusterizerComponent::Spawn()
 int AliHLTPHOSClusterizerComponent::DoInit(int argc, const char** argv)
 {
    
+   fClusterizerPtr = new AliHLTCaloClusterizer("PHOS");
+   
    fRecoParamsPtr = new AliHLTPHOSRecoParamHandler(); 
     
     return AliHLTCaloClusterizerComponent::DoInit(argc, argv);
diff --git a/HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.cxx b/HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.cxx
new file mode 100644 (file)
index 0000000..dcfc216
--- /dev/null
@@ -0,0 +1,78 @@
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Oystein Djuvsland <oysteind@ift.uib.no>                       *
+ *                                                                        *
+ * 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.                  *
+ **************************************************************************/
+
+
+#include "AliHLTPHOSClusterizerComponentNbyN.h"
+#include "AliHLTCaloClusterizerNbyN.h"
+
+ClassImp(AliHLTPHOSClusterizerComponentNbyN);
+
+AliHLTPHOSClusterizerComponentNbyN gAliHLTPHOSClusterizerComponentNbyN;
+
+AliHLTPHOSClusterizerComponentNbyN::AliHLTPHOSClusterizerComponentNbyN() : AliHLTPHOSClusterizerComponent()
+{
+// Constructor
+}
+
+AliHLTPHOSClusterizerComponentNbyN::~AliHLTPHOSClusterizerComponentNbyN()
+{
+// Destructor
+}
+
+
+const char* AliHLTPHOSClusterizerComponentNbyN::GetComponentID()
+{
+    // See header file for class documentation
+    return "PhosClusterizerNbyN";
+}
+
+
+int AliHLTPHOSClusterizerComponentNbyN::DoInit(int argc, const char** argv)
+{
+    // See header file for class documentation
+    fClusterizerPtr = new AliHLTCaloClusterizerNbyN("PHOS");
+
+    return AliHLTPHOSClusterizerComponent::DoInit(argc, argv);
+}
+
+int AliHLTPHOSClusterizerComponentNbyN::ScanConfigurationArgument(int argc, const char** argv)
+{
+// See header file for class documentation
+   
+   if (argc <= 0) return 0;
+
+    int i=0;
+
+    TString argument=argv[i];
+
+    if (argument.CompareTo("-gridsize") == 0)
+    {
+        if (++i >= argc) return -EPROTO;
+        argument = argv[i];
+        dynamic_cast<AliHLTCaloClusterizerNbyN*>(fClusterizerPtr)->SetGridDimension(argument.Atof());
+        return 1;
+    }
+    
+    return AliHLTCaloClusterizerComponent::ScanConfigurationArgument(argc, argv);
+    
+}
+
+AliHLTComponent*
+AliHLTPHOSClusterizerComponentNbyN::Spawn()
+{
+  //See headerfile for documentation
+
+  return new AliHLTPHOSClusterizerComponentNbyN();
+}
diff --git a/HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.h b/HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.h
new file mode 100644 (file)
index 0000000..87c67af
--- /dev/null
@@ -0,0 +1,58 @@
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Oystein Djuvsland <oysteind@ift.uib.no>                       *
+ *                                                                        *
+ * 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.                  *
+ **************************************************************************/
+
+
+#ifndef ALIHLTPHOSCLUSTERIZERCOMPONENTNBYN_H
+#define ALIHLTPHOSCLUSTERIZERCOMPONENTNBYN_H
+
+#include <AliHLTPHOSClusterizerComponent.h>
+
+
+class AliHLTPHOSClusterizerComponentNbyN : public AliHLTPHOSClusterizerComponent
+{
+
+public:
+
+    /** Constructor */
+    AliHLTPHOSClusterizerComponentNbyN();
+
+    /** Destructor */
+    virtual ~AliHLTPHOSClusterizerComponentNbyN();
+
+    /** interface function, see @ref AliHLTComponent for description */
+    const char* GetComponentID();
+
+    /** interface function, see @ref AliHLTComponent for description */
+    AliHLTComponent* Spawn();
+
+protected:
+
+    /** interface function, see @ref AliHLTComponent for description */
+    int ScanConfigurationArgument ( int argc, const char** argv );
+
+    /** interface function, see @ref AliHLTComponent for description */
+    virtual int DoInit(int argc, const char** argv);
+
+      /** Copy constructor,  not implemented */
+    AliHLTPHOSClusterizerComponentNbyN(const AliHLTPHOSClusterizerComponent& );;
+  
+  /** Assignment operator, not implemented */
+    AliHLTPHOSClusterizerComponentNbyN & operator = (const AliHLTPHOSClusterizerComponentNbyN);
+
+    
+    ClassDef(AliHLTPHOSClusterizerComponent, 0);
+};
+
+#endif // ALIHLTPHOSCLUSTERIZERCOMPONENTNBYN_H
index a4f0c0d2d5630f8bd3d3431095458318b6d9aa3b..e53caf34b876f073b0c5a33febcc4286019d12d4 100644 (file)
@@ -19,6 +19,7 @@
 //#pragma link C++ class AliHLTPHOSRawAnalyzerLMS+;  
 #pragma link C++ class AliHLTPHOSRawAnalyzerPeakFinder+;  
 #pragma link C++ class AliHLTPHOSDigitMaker+; 
+#pragma link C++ class AliHLTPHOSDigitMakerComponent+;
 #pragma link C++ class AliHLTPHOSSanityInspector+; 
 #pragma link C++ class AliHLTPHOSESDMaker+; 
 #pragma link C++ class AliHLTPHOSClusterAnalyser+;