diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..96496488970ed4fe7b21f81da93ae28110ef4df2 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) + +find_package(GaudiProject) + +gaudi_project(cepc-offline HEAD + USE Gaudi v29r2 ) \ No newline at end of file diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..5605c6bbc2dadb5b0b4d0c4a483072040b394f1d --- /dev/null +++ b/Examples/CMakeLists.txt @@ -0,0 +1,11 @@ + +gaudi_subdir(Examples v0r0) + +set(Examples_srcs + src/HelloWorld/*.cpp +) + +gaudi_add_module(Examples ${Examples_srcs} + INCLUDE_DIRS GaudiKernel + LINK_LIBRARIES GaudiKernel +) \ No newline at end of file diff --git a/Examples/src/HelloWorld/HelloAlg.cpp b/Examples/src/HelloWorld/HelloAlg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..730240c2e99b7d980cc05f281de434a4ea8a96c6 --- /dev/null +++ b/Examples/src/HelloWorld/HelloAlg.cpp @@ -0,0 +1,31 @@ +#include "HelloAlg.h" + +DECLARE_COMPONENT(HelloAlg) + +HelloAlg::HelloAlg(const std::string& name, ISvcLocator* pSvcLocator) +: Algorithm(name, pSvcLocator) { + +} + +StatusCode +HelloAlg::initialize() { + StatusCode sc; + + info() << "MyInt: " << m_int.value() << endmsg; + + return sc; +} + +StatusCode +HelloAlg::execute() { + StatusCode sc; + return sc; +} + +StatusCode +HelloAlg::finalize() { + StatusCode sc; + return sc; +} + + diff --git a/Examples/src/HelloWorld/HelloAlg.h b/Examples/src/HelloWorld/HelloAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..9c689ca91c4363403285348c14d378aa0cf56054 --- /dev/null +++ b/Examples/src/HelloWorld/HelloAlg.h @@ -0,0 +1,21 @@ +#ifndef HelloAlg_h +#define HelloAlg_h + +#include <GaudiKernel/Algorithm.h> +#include "GaudiKernel/Property.h" + +class HelloAlg: public Algorithm { +public: + HelloAlg(const std::string& name, ISvcLocator* pSvcLocator); + + StatusCode initialize() override; + StatusCode execute() override; + StatusCode finalize() override; + +private: + + Gaudi::Property<int> m_int{this, "MyInt", 42}; +}; + + +#endif diff --git a/Generator/CMakeLists.txt b/Generator/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..ef5f37288904999d8fff0953e54169bc519b7ca7 --- /dev/null +++ b/Generator/CMakeLists.txt @@ -0,0 +1,2 @@ + +gaudi_subdir(Generator v0r0) \ No newline at end of file diff --git a/README.md b/README.md index 50c189ade6390cf01247d82244efad52324c63cb..fbc118c69d3c0ee914b40011ffce9bf9ddae0cdc 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,18 @@ # cepc-offline -CEPC offline software prototype +CEPC offline software prototype based on Gaudi ## Packages * Core: Core Software Based on Gaudi -* Simulation: Physics Generator & Detector Simulation +* Generator: Physics Generator -* Reconstruction +* Simulation: Detector Simulation -* Examples: For new comers +* Reconstruction: Reconstruction + +* Examples: For new comers and users + +* cepcenv: tools to help developers build packages -* cepcenv: tools to help developers build packages \ No newline at end of file