Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jonrob/MooreAnalysis
  • lhcb/MooreAnalysis
2 results
Show changes
Commits on Source (1)
Showing
with 65 additions and 37 deletions
......@@ -32,4 +32,4 @@ lhcb_add_subdirectories(
)
lhcb_finalize_configuration(NO_EXPORT)
lhcb_finalize_configuration()
......@@ -57,7 +57,7 @@ StatusCode TupleToolEventInfo::initialize() {
}
//=============================================================================
StatusCode TupleToolEventInfo::fill( Tuples::Tuple& tuple ) {
StatusCode TupleToolEventInfo::fill( Tuples::Tuple& tuple ) const {
const std::string prefix = fullName();
// Load the ODIN
......@@ -67,12 +67,12 @@ StatusCode TupleToolEventInfo::fill( Tuples::Tuple& tuple ) {
return Error( "Cannot load the ODIN data object", StatusCode::SUCCESS );
}
LHCb::HltDecReports* decreport_hlt1 = m_hlt1DecReportDh.getIfExists();
//LHCb::HltDecReports* decreport_hlt1 = m_hlt1DecReportDh.getIfExists();
LHCb::HltDecReports* decreport_hlt2 = m_hlt2DecReportDh.getIfExists();
if ( msgLevel( MSG::DEBUG ) ) {
debug() << "Getting Hlt1 and Hlt2 reports " << decreport_hlt1 << " " << decreport_hlt2 << endmsg;
//debug() << "Getting Hlt1 and Hlt2 reports " << decreport_hlt1 << " " << decreport_hlt2 << endmsg;
}
if ( !decreport_hlt1 ) Warning( "No Hlt1 DecReport found. Are you sure?", StatusCode::SUCCESS, 1 ).ignore();
//if ( !decreport_hlt1 ) Warning( "No Hlt1 DecReport found. Are you sure?", StatusCode::SUCCESS, 1 ).ignore();
if ( !decreport_hlt2 ) Warning( "No Hlt2 DecReport found. Are you sure?", StatusCode::SUCCESS, 1 ).ignore();
double chrono_time = 0;
......@@ -98,7 +98,7 @@ StatusCode TupleToolEventInfo::fill( Tuples::Tuple& tuple ) {
test &= tuple->column( prefix + "BCID", odin->bunchId() );
test &= tuple->column( prefix + "BCType", static_cast<int>( odin->bunchCrossingType() ) );
test &= tuple->column( prefix + "OdinTCK", odin->triggerConfigurationKey() );
test &= tuple->column( prefix + "HLT1TCK", decreport_hlt1 ? decreport_hlt1->configuredTCK() : 0 );
//test &= tuple->column( prefix + "HLT1TCK", decreport_hlt1 ? decreport_hlt1->configuredTCK() : 0 );
test &= tuple->column( prefix + "HLT2TCK", decreport_hlt2 ? decreport_hlt2->configuredTCK() : 0 );
test &= tuple->column( prefix + "GpsTime", static_cast<unsigned long long>( odin->gpsTime() ) );
......
......@@ -48,15 +48,15 @@ public:
~TupleToolEventInfo(){}; ///< Destructor
StatusCode initialize() override;
StatusCode fill( Tuples::Tuple& ) override;
StatusCode fill( Tuples::Tuple& ) const override;
private:
ILHCbMagnetSvc* m_magSvc;
typedef std::vector<std::string> AlgorithmNames;
Gaudi::Property<AlgorithmNames> m_algNames{this, "Algorithms"}; ///< List of algorithm(s) to include in timing
DataObjectReadHandle<LHCb::ODIN> m_odinDh = {this, "ODIN", LHCb::ODINLocation::Default};
DataObjectReadHandle<LHCb::HltDecReports> m_hlt1DecReportDh = {this, "Hlt1DecReports",
LHCb::HltDecReportsLocation::Hlt1Default};
DataObjectReadHandle<LHCb::ODIN> m_odinDh = {this, "ODIN", "/Event/createODIN/ODIN"};
//DataObjectReadHandle<LHCb::HltDecReports> m_hlt1DecReportDh = {this, "Hlt1DecReports",
// LHCb::HltDecReportsLocation::Hlt1Default};
DataObjectReadHandle<LHCb::HltDecReports> m_hlt2DecReportDh = {this, "Hlt2DecReports",
LHCb::HltDecReportsLocation::Hlt2Default};
};
......
......@@ -84,6 +84,9 @@ public:
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&,
IGeometryInfo const& ) override;
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&) override {
return StatusCode::FAILURE;
};
private:
/// fill end vertex stuff
......
......@@ -19,6 +19,8 @@
#include "GaudiAlg/Tuple.h"
#include "GaudiAlg/TupleObj.h"
#include "DetDesc/IDetectorElement.h"
/**
* \brief Fill kinematic information for DecayTreeTuple
*
......@@ -49,6 +51,8 @@ public:
/// Standard constructor
TupleToolKinematic( const std::string& type, const std::string& name, const IInterface* parent );
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple& ) override;
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&,
IGeometryInfo const& geometry ) override;
......@@ -86,6 +90,14 @@ StatusCode TupleToolKinematic::initialize() {
return sc;
}
StatusCode TupleToolKinematic::fill( const LHCb::Particle* mother, const LHCb::Particle* P, const std::string& head,
Tuples::Tuple& tuple) {
// Get the default geometry FIXME, use functional framework
auto lhcb = getDet<IDetectorElement>( "/dd/Structure/LHCb" );
if ( !lhcb ) { throw GaudiException( "Could not load geometry", name(), StatusCode::FAILURE ); }
return fill(mother, P, head, tuple, *lhcb->geometry());
}
StatusCode TupleToolKinematic::fill( const LHCb::Particle* mother, const LHCb::Particle* P, const std::string& head,
Tuples::Tuple& tuple, IGeometryInfo const& geometry ) {
const std::string prefix = fullName( head );
......
......@@ -54,6 +54,10 @@ public:
TupleToolMCTruth( const std::string& type, const std::string& name, const IInterface* parent );
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&,
IGeometryInfo const& ) override;
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&) override {
return StatusCode::FAILURE;
};
StatusCode initialize() override;
private:
......
......@@ -48,6 +48,9 @@ struct TupleToolPid : TupleToolBase, virtual IParticleTupleTool {
TupleToolPid( const std::string& type, const std::string& name, const IInterface* parent );
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&,
IGeometryInfo const& ) override;
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&) override {
return StatusCode::FAILURE;
};
};
using namespace LHCb;
......
......@@ -45,7 +45,7 @@ StatusCode TupleToolTrigger::initialize() {
return sc;
}
StatusCode TupleToolTrigger::fillBasic( Tuples::Tuple& tuple ) {
StatusCode TupleToolTrigger::fillBasic( Tuples::Tuple& tuple ) const {
if ( msgLevel( MSG::DEBUG ) ) debug() << "Tuple Tool Trigger Basic" << endmsg;
const std::string prefix = fullName();
......@@ -72,7 +72,7 @@ StatusCode TupleToolTrigger::fillBasic( Tuples::Tuple& tuple ) {
}
if ( !decReports2 )
debug() << "No reports at LHCb::HltDecReportsLocation::Hlt2Default (" << LHCb::HltDecReportsLocation::Hlt2Default
always() << "No reports at LHCb::HltDecReportsLocation::Hlt2Default (" << LHCb::HltDecReportsLocation::Hlt2Default
<< ")" << endmsg;
// fill the HLT1 global
......@@ -93,7 +93,7 @@ StatusCode TupleToolTrigger::fillBasic( Tuples::Tuple& tuple ) {
return StatusCode::SUCCESS;
}
StatusCode TupleToolTrigger::fillVerbose( Tuples::Tuple& tuple ) {
StatusCode TupleToolTrigger::fillVerbose( Tuples::Tuple& tuple ) const {
bool test = true;
if ( msgLevel( MSG::DEBUG ) ) debug() << "Tuple Tool Trigger Verbose" << endmsg;
......@@ -112,12 +112,12 @@ StatusCode TupleToolTrigger::fillVerbose( Tuples::Tuple& tuple ) {
return StatusCode( test );
}
StatusCode TupleToolTrigger::fillHlt( Tuples::Tuple& tuple, const std::string& level ) {
StatusCode TupleToolTrigger::fillHlt( Tuples::Tuple& tuple, const std::string& level ) const {
const std::string prefix = fullName();
const LHCb::HltDecReports* decReports( 0 );
if ( level == "Hlt1" ) {
decReports = m_hlt1DecReportDh.get();
//decReports = m_hlt1DecReportDh.get();
} else if ( level == "Hlt2" ) {
decReports = m_hlt2DecReportDh.get();
} else {
......@@ -168,7 +168,7 @@ StatusCode TupleToolTrigger::fillHlt( Tuples::Tuple& tuple, const std::string& l
return StatusCode::SUCCESS;
}
StatusCode TupleToolTrigger::fillRoutingBits( Tuples::Tuple& tuple ) {
StatusCode TupleToolTrigger::fillRoutingBits( Tuples::Tuple& tuple ) const {
const std::string prefix = fullName();
LHCb::RawEvent* rawEvent = NULL;
......@@ -205,7 +205,7 @@ StatusCode TupleToolTrigger::fillVerbose( const LHCb::Particle* P1, const LHCb::
return TupleToolTriggerBase::fillBasic( P1, P2, S, T );
}
StatusCode TupleToolTrigger::fill( Tuples::Tuple& tuple ) { return TupleToolTriggerBase::fill( tuple ); }
StatusCode TupleToolTrigger::fill( Tuples::Tuple& tuple ) const { return TupleToolTriggerBase::fill( tuple ); }
StatusCode TupleToolTrigger::fill( const LHCb::Particle* top, const LHCb::Particle* part, const std::string& head,
Tuples::Tuple& tuple, IGeometryInfo const& geometry ) {
......
......@@ -36,22 +36,23 @@
* @date 2007-11-07
*/
class TupleToolTrigger : public TupleToolTriggerBase, virtual public IEventTupleTool {
using TupleToolTriggerBase::fill;
public:
TupleToolTrigger( const std::string& type, const std::string& name, const IInterface* parent );
StatusCode initialize() override;
StatusCode fill( Tuples::Tuple& tuple ) override;
StatusCode fill( Tuples::Tuple& tuple ) const override;
StatusCode fill( const LHCb::Particle* top, const LHCb::Particle* part, const std::string& head, Tuples::Tuple& tuple,
IGeometryInfo const& ) override;
private:
/// fill verbose information for the HLT
StatusCode fillHlt( Tuples::Tuple&, const std::string& );
StatusCode fillRoutingBits( Tuples::Tuple& );
StatusCode fillHlt( Tuples::Tuple&, const std::string& ) const ;
StatusCode fillRoutingBits( Tuples::Tuple& ) const ;
StatusCode fillBasic( Tuples::Tuple& tuple ) override;
StatusCode fillBasic( Tuples::Tuple& tuple ) const override;
StatusCode fillVerbose( Tuples::Tuple& tuple ) override;
StatusCode fillVerbose( Tuples::Tuple& tuple ) const override;
StatusCode fillBasic( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple& ) override;
......
......@@ -40,8 +40,8 @@ TupleToolTriggerBase::TupleToolTriggerBase( const std::string& type, const std::
// to turn all verbosity on, set Verbose=true
declareProperty( "VerboseHlt1", m_verboseHlt1 = false );
declareProperty( "VerboseHlt2", m_verboseHlt2 = false );
declareProperty( "FillHlt1", m_doHlt1 = true );
declareProperty( "VerboseHlt2", m_verboseHlt2 = true );
declareProperty( "FillHlt1", m_doHlt1 = false );
declareProperty( "FillHlt2", m_doHlt2 = true );
// List of triggers to look at
......@@ -57,7 +57,7 @@ StatusCode TupleToolTriggerBase::initialize() {
if ( isVerbose() ) m_verboseHlt1 = m_verboseHlt2 = true;
const bool iv = ( m_verboseHlt1 || m_verboseHlt2 );
m_triggerList.push_back("Hlt2CharmD0ToKmPipLineDecision");
if ( !m_triggerList.empty() && !iv ) {
warning()
<< "You have set a list of triggers to look for, but not asked for verbose mode ... OK, but this is weird! "
......@@ -92,7 +92,7 @@ StatusCode TupleToolTriggerBase::fill( const LHCb::Particle* M, const LHCb::Part
return StatusCode( test );
}
StatusCode TupleToolTriggerBase::fill( Tuples::Tuple& tuple ) {
StatusCode TupleToolTriggerBase::fill( Tuples::Tuple& tuple ) const {
if ( msgLevel( MSG::DEBUG ) ) debug() << "fill tuple " << endmsg;
bool test = true;
test &= fillBasic( tuple );
......@@ -141,7 +141,7 @@ StatusCode TupleToolTriggerBase::fillBasic( const LHCb::Particle*, const LHCb::P
return Error( "Don't call the fill of the baseclass!!" );
}
StatusCode TupleToolTriggerBase::fillBasic( Tuples::Tuple& ) {
StatusCode TupleToolTriggerBase::fillBasic( Tuples::Tuple& ) const {
return Error( "Don't call the fill of the baseclass!!" );
}
......@@ -150,6 +150,6 @@ StatusCode TupleToolTriggerBase::fillVerbose( const LHCb::Particle*, const LHCb:
return Error( "Don't call the fill of the baseclass!!" );
}
StatusCode TupleToolTriggerBase::fillVerbose( Tuples::Tuple& ) {
StatusCode TupleToolTriggerBase::fillVerbose( Tuples::Tuple& ) const {
return Error( "Don't call the fill of the baseclass!!" );
}
......@@ -50,7 +50,10 @@ public:
StatusCode initialize() override;
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&,
IGeometryInfo const& ) override;
virtual StatusCode fill( Tuples::Tuple& );
StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple&) override {
return StatusCode::FAILURE;
};
virtual StatusCode fill( Tuples::Tuple& ) const ;
protected:
bool m_verboseHlt1; ///< get details on Hlt1
......@@ -60,8 +63,8 @@ protected:
bool m_doHlt2; ///< fill hlt2 global
// Dec Report location
DataObjectReadHandle<LHCb::HltDecReports> m_hlt1DecReportDh = {this, "Hlt1DecReports",
LHCb::HltDecReportsLocation::Hlt1Default};
//DataObjectReadHandle<LHCb::HltDecReports> m_hlt1DecReportDh = {this, "Hlt1DecReports",
// LHCb::HltDecReportsLocation::Hlt1Default};
DataObjectReadHandle<LHCb::HltDecReports> m_hlt2DecReportDh = {this, "Hlt2DecReports",
LHCb::HltDecReportsLocation::Hlt2Default};
......@@ -78,9 +81,9 @@ protected:
protected:
virtual StatusCode fillBasic( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple& );
virtual StatusCode fillBasic( Tuples::Tuple& );
virtual StatusCode fillBasic( Tuples::Tuple& ) const;
virtual StatusCode fillVerbose( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple& );
virtual StatusCode fillVerbose( Tuples::Tuple& );
virtual StatusCode fillVerbose( Tuples::Tuple& ) const;
};
......@@ -35,7 +35,7 @@ struct GAUDI_API IEventTupleTool : extend_interfaces<IAlgTool> {
DeclareInterfaceID( IEventTupleTool, 2, 0 );
//! Fill the tuple.
virtual StatusCode fill( Tuples::Tuple& ) = 0;
virtual StatusCode fill( Tuples::Tuple& ) const = 0;
};
#endif // KERNEL_IEVENTTUPLETOOL_H
......@@ -41,4 +41,7 @@ struct GAUDI_API IParticleTupleTool : extend_interfaces<IAlgTool> {
//! - \b tuple: the tuple to fill
virtual StatusCode fill( LHCb::Particle const* top, LHCb::Particle const* part, std::string const& head,
Tuples::Tuple& tuple, IGeometryInfo const& geometry ) = 0;
virtual StatusCode fill( LHCb::Particle const* top, LHCb::Particle const* part, std::string const& head,
Tuples::Tuple& tuple ) = 0;
};
......@@ -24,7 +24,7 @@ endif()
# -- Public dependencies
lhcb_find_package(Moore REQUIRED)
lhcb_find_package(Allen REQUIRED)
lhcb_find_package(Analysis REQUIRED)
#lhcb_find_package(Analysis REQUIRED)
# -- Private dependencies
......
......@@ -3,5 +3,4 @@ name: MooreAnalysis
license: GPL-3.0-only
dependencies:
- Moore
- Allen
- Analysis
- Allen
\ No newline at end of file