-
Notifications
You must be signed in to change notification settings - Fork 164
Add FT0 module #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Barthelemy
merged 13 commits into
AliceO2Group:master
from
Kavaldrin:QC_for_FT0_merging
Nov 12, 2020
Merged
Add FT0 module #536
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c288449
initial work - just to test on cluster
7c9ed16
removed tmultigraph
8ee0478
some cleaup
e97374c
add space at the end of file
d3f2376
updated repo
cf8c71f
add basic example of post processing
0eed7d0
fixed postprocessing config
5bd4ed7
config cleanup
1764bf4
code cleaup
f08aefd
Merge branch 'master' into QC_for_FT0
f52d987
QC for FT0
53258be
update multinode setup
3d6121f
updated multinode config
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # ---- Library ---- | ||
|
|
||
| add_library(QcFT0) | ||
|
|
||
| target_sources(QcFT0 PRIVATE src/BasicDigitQcTask.cxx | ||
| src/ChannelsCheck.cxx | ||
| src/DigitsCheck.cxx | ||
| src/MergedTreeCheck.cxx | ||
| src/TreeReaderPostProcessing.cxx) | ||
|
|
||
| target_include_directories( | ||
| QcFT0 | ||
| PUBLIC $<INSTALL_INTERFACE:include> | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
|
|
||
| target_link_libraries(QcFT0 PUBLIC QualityControl O2::DataFormatsFT0) | ||
|
|
||
|
|
||
| install(TARGETS QcFT0 | ||
| LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
| ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
|
|
||
|
|
||
| add_root_dictionary(QcFT0 | ||
| HEADERS include/FT0/BasicDigitQcTask.h | ||
| include/FT0/ChannelsCheck.h | ||
| include/FT0/DigitsCheck.h | ||
| include/FT0/Utilities.h | ||
| include/FT0/MergedTreeCheck.h | ||
| include/FT0/TreeReaderPostProcessing.h | ||
| LINKDEF include/FT0/LinkDef.h | ||
| BASENAME QcFT0) | ||
|
|
||
| # ---- Executables ---- | ||
|
|
||
| set(EXE_SRCS | ||
| src/runDataProducer.cxx ) | ||
| set(EXE_NAMES | ||
| o2-qc-ft0-data-producer) | ||
|
|
||
| list(LENGTH EXE_SRCS count) | ||
| math(EXPR count "${count}-1") | ||
| foreach(i RANGE ${count}) | ||
| list(GET EXE_SRCS ${i} src) | ||
| list(GET EXE_NAMES ${i} name) | ||
| add_executable(${name} ${src}) | ||
| target_link_libraries(${name} PRIVATE QualityControl QcFT0 O2::DataFormatsFT0) | ||
| endforeach() | ||
|
|
||
| install( | ||
| TARGETS o2-qc-ft0-data-producer | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
| ) | ||
|
|
||
|
|
||
| # ---- Test(s) ---- | ||
|
|
||
| set(TEST_SRCS test/testQcFT0.cxx) | ||
|
|
||
| foreach(test ${TEST_SRCS}) | ||
| get_filename_component(test_name ${test} NAME) | ||
| string(REGEX REPLACE ".cxx" "" test_name ${test_name}) | ||
|
|
||
| add_executable(${test_name} ${test}) | ||
| target_link_libraries(${test_name} | ||
| PRIVATE QcFT0 Boost::unit_test_framework) | ||
| add_test(NAME ${test_name} COMMAND ${test_name}) | ||
| set_property(TARGET ${test_name} | ||
| PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests) | ||
| set_tests_properties(${test_name} PROPERTIES TIMEOUT 20) | ||
| endforeach() | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| { | ||
| "qc": { | ||
| "config": { | ||
| "database": { | ||
| "implementation": "CCDB", | ||
| "host": "ccdb-test.cern.ch:8080", | ||
| "username": "not_applicable", | ||
| "password": "not_applicable", | ||
| "name": "not_applicable" | ||
| }, | ||
| "Activity": { | ||
| "number": "42", | ||
| "type": "2" | ||
| }, | ||
| "monitoring": { | ||
| "url": "infologger:///debug?METRIC" | ||
| }, | ||
| "consul": { | ||
| "url": "http://consul-test.cern.ch:8500" | ||
| }, | ||
| "conditionDB": { | ||
| "url": "ccdb-test.cern.ch:8080" | ||
| } | ||
| }, | ||
| "tasks": { | ||
| "BasicDigitQcTask": { | ||
| "active": "true", | ||
| "className": "o2::quality_control_modules::ft0::BasicDigitQcTask", | ||
| "moduleName": "QcFT0", | ||
| "detectorName": "FT0", | ||
| "cycleDurationSeconds": "10", | ||
| "maxNumberCycles": "-1", | ||
| "dataSource": { | ||
| "type": "direct", | ||
| "query": "digits:FT0/DIGITSBC/0;channels:FT0/DIGITSCH/0" | ||
| }, | ||
| "taskParameters": {} | ||
| } | ||
| }, | ||
| "checks": { | ||
| "DigitsCheck": { | ||
| "active": "true", | ||
| "dataSource": [{ | ||
| "type": "Task", | ||
| "name": "BasicDigitQcTask", | ||
| "MOs": ["EventTree"] | ||
| }], | ||
| "className": "o2::quality_control_modules::ft0::DigitsCheck", | ||
| "moduleName": "QcFT0", | ||
| "detectorName": "FT0", | ||
| "policy": "OnAny" | ||
| }, | ||
| "ChannelsCheck": { | ||
| "active": "true", | ||
| "dataSource": [{ | ||
| "type": "Task", | ||
| "name": "BasicDigitQcTask", | ||
| "MOs": ["EventTree"] | ||
| }], | ||
| "className": "o2::quality_control_modules::ft0::ChannelsCheck", | ||
| "moduleName": "QcFT0", | ||
| "detectorName": "FT0", | ||
| "policy": "OnAny" | ||
| } | ||
| } | ||
| }, | ||
| "dataSamplingPolicies": [ | ||
| ] | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| // distributed under the terms of the GNU General Public License v3 (GPL | ||
| // Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| /// | ||
| /// \file BasicDigitQcTask.h | ||
| /// \author Milosz Filus | ||
| /// Example of QC Task for FT0 detector | ||
|
|
||
| #ifndef QC_MODULE_FT0_FT0BASICDIGITQCTASK_H | ||
| #define QC_MODULE_FT0_FT0BASICDIGITQCTASK_H | ||
|
|
||
| #include "QualityControl/TaskInterface.h" | ||
| #include <memory> | ||
| #include "TH1.h" | ||
| #include "TH2.h" | ||
| #include "TTree.h" | ||
| #include "TFile.h" | ||
| #include "TMultiGraph.h" | ||
| #include "Rtypes.h" | ||
|
|
||
| using namespace o2::quality_control::core; | ||
|
|
||
| namespace o2::quality_control_modules::ft0 | ||
| { | ||
|
|
||
| class BasicDigitQcTask final : public TaskInterface | ||
| { | ||
| public: | ||
| /// \brief Constructor | ||
| BasicDigitQcTask() = default; | ||
| /// Destructor | ||
| ~BasicDigitQcTask() override; | ||
|
|
||
| // Definition of the methods for the template method pattern | ||
| void initialize(o2::framework::InitContext& ctx) override; | ||
| void startOfActivity(Activity& activity) override; | ||
| void startOfCycle() override; | ||
| void monitorData(o2::framework::ProcessingContext& ctx) override; | ||
| void endOfCycle() override; | ||
| void endOfActivity(Activity& activity) override; | ||
| void reset() override; | ||
|
|
||
| private: | ||
| // Object which will be published | ||
| std::unique_ptr<TH1F> mChargeHistogram; | ||
| std::unique_ptr<TH1F> mTimeHistogram; | ||
| std::unique_ptr<TH2F> mAmplitudeAndTime; | ||
| std::unique_ptr<TTree> mTTree; | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control_modules::ft0 | ||
|
|
||
| #endif // QC_MODULE_FT0_FT0BasicDigitQcTask_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| // distributed under the terms of the GNU General Public License v3 (GPL | ||
| // Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| /// | ||
| /// \file ChannelsCheck.h | ||
| /// \author Milosz Filus | ||
| /// Dummy check for FT0 detector | ||
|
|
||
| #ifndef QC_MODULE_FT0_FT0ChannelsCheck_H | ||
| #define QC_MODULE_FT0_FT0ChannelsCheck_H | ||
|
|
||
| // Quality Control | ||
| #include "QualityControl/CheckInterface.h" | ||
|
|
||
| namespace o2::quality_control_modules::ft0 | ||
| { | ||
|
|
||
| class ChannelsCheck : public o2::quality_control::checker::CheckInterface | ||
| { | ||
| public: | ||
| /// Default constructor | ||
| ChannelsCheck() = default; | ||
| /// Destructor | ||
| ~ChannelsCheck() override = default; | ||
|
|
||
| // Override interface | ||
| void configure(std::string name) override; | ||
| Quality check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap) override; | ||
| void beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult = Quality::Null) override; | ||
| std::string getAcceptedType() override; | ||
|
|
||
| ClassDefOverride(ChannelsCheck, 1); | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control_modules::ft0 | ||
|
|
||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| // distributed under the terms of the GNU General Public License v3 (GPL | ||
| // Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| /// | ||
| /// \file ChannelsCheck.h | ||
| /// \author Milosz Filus | ||
| /// Another dummy check for FT0 detector | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SAme question |
||
|
|
||
| #ifndef QC_MODULE_FT0_FT0DigitsCheck_H | ||
| #define QC_MODULE_FT0_FT0DigitsCheck_H | ||
|
|
||
| // Quality Control | ||
| #include "QualityControl/CheckInterface.h" | ||
|
|
||
| namespace o2::quality_control_modules::ft0 | ||
| { | ||
|
|
||
| /// \brief | ||
| /// | ||
| class DigitsCheck : public o2::quality_control::checker::CheckInterface | ||
| { | ||
| public: | ||
| /// Default constructor | ||
| DigitsCheck() = default; | ||
| /// Destructor | ||
| ~DigitsCheck() override = default; | ||
|
|
||
| // Override interface | ||
| void configure(std::string name) override; | ||
| Quality check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap) override; | ||
| void beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult = Quality::Null) override; | ||
| std::string getAcceptedType() override; | ||
|
|
||
| ClassDefOverride(DigitsCheck, 1); | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control_modules::ft0 | ||
|
|
||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #ifdef __CLING__ | ||
| #pragma link off all globals; | ||
| #pragma link off all classes; | ||
| #pragma link off all functions; | ||
|
|
||
| #pragma link C++ class o2::quality_control_modules::ft0::EventWithChannelData + ; | ||
|
|
||
| #pragma link C++ class o2::quality_control_modules::ft0::BasicDigitQcTask + ; | ||
| #pragma link C++ class o2::quality_control_modules::ft0::DigitsCheck + ; | ||
| #pragma link C++ class o2::quality_control_modules::ft0::ChannelsCheck + ; | ||
| #pragma link C++ class o2::quality_control_modules::ft0::MergedTreeCheck + ; | ||
| #pragma link C++ class o2::quality_control_modules::ft0::TreeReaderPostProcessing + ; | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| // distributed under the terms of the GNU General Public License v3 (GPL | ||
| // Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| /// | ||
| /// \file MergedTreeCheck.h | ||
| /// \author Milosz Filus | ||
| /// Example of post processing check | ||
|
|
||
| #ifndef QC_MODULE_FT0_FT0MergedTreeCheck_H | ||
| #define QC_MODULE_FT0_FT0MergedTreeCheck_H | ||
|
|
||
| // Quality Control | ||
| #include "QualityControl/CheckInterface.h" | ||
|
|
||
| namespace o2::quality_control_modules::ft0 | ||
| { | ||
|
|
||
| class MergedTreeCheck : public o2::quality_control::checker::CheckInterface | ||
| { | ||
| public: | ||
| /// Default constructor | ||
| MergedTreeCheck() = default; | ||
| /// Destructor | ||
| ~MergedTreeCheck() override = default; | ||
|
|
||
| // Override interface | ||
| void configure(std::string name) override; | ||
| Quality check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap) override; | ||
| void beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult = Quality::Null) override; | ||
| std::string getAcceptedType() override; | ||
|
|
||
| ClassDefOverride(MergedTreeCheck, 1); | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control_modules::ft0 | ||
|
|
||
| #endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really a dummy check ?