diff --git a/graphics/VP1/VP1Algs/CMakeLists.txt b/graphics/VP1/VP1Algs/CMakeLists.txt
index 4cc409c3db2a122cd8005b82bf96651b4e143416..32eb4a72d365f6083b4d740ee9bba54e657cba53 100644
--- a/graphics/VP1/VP1Algs/CMakeLists.txt
+++ b/graphics/VP1/VP1Algs/CMakeLists.txt
@@ -28,4 +28,29 @@ atlas_install_joboptions( share/*.py )
 atlas_install_scripts( share/vp1 )
 atlas_install_scripts( share/clear-bash-hash-table-vp1 )
 
+#----------------------------------------------------------
+# CONFIGURING THE ENVIRONMENT VARIABLES FOR THE PACKAGE   #
+#
+#message( "CMAKE_BINARY_DIR path:" ${CMAKE_BINARY_DIR} )
+#message( "ATLAS_PLATFORM path:" ${ATLAS_PLATFORM} )
+# set a variable to be used in the 'Config' script. 
+#   The variable will be substituted with the path when file is 'configured' 
+#   and copied from 'source' to 'binary'
+set( BUILD_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} )
+# Configure the environment setup module. 
+#   The 'configure_file' command here below copies the input file in the 'source' dir
+#   to the output file in 'binary' dir, e.g. in ../build/graphics/VP1/VP1Algs/
+configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/VP1AlgsEnvironmentConfig.cmake.in  
+    ${CMAKE_CURRENT_BINARY_DIR}/VP1AlgsEnvironmentConfig.cmake   
+    @ONLY )
+# Set the folder where CMake can find the 'Config' file for the dummy package
+set( VP1AlgsEnvironment_DIR ${CMAKE_CURRENT_BINARY_DIR}  
+    CACHE PATH "Location of VP1AlgsEnvironmentConfig.cmake" 
+    FORCE 
+    )
+# And now "find" it! It will set the env vars defined in the package's 'Config' file.
+find_package( VP1AlgsEnvironment REQUIRED )
+message( "VP1PLUGINPATH has been set to: " $ENV{VP1PLUGINPATH} )
+
 
diff --git a/graphics/VP1/VP1Algs/VP1AlgsEnvironmentConfig.cmake.in b/graphics/VP1/VP1Algs/VP1AlgsEnvironmentConfig.cmake.in
new file mode 100644
index 0000000000000000000000000000000000000000..db27ce622c54d453bf4ccc900e97bd01617977bb
--- /dev/null
+++ b/graphics/VP1/VP1Algs/VP1AlgsEnvironmentConfig.cmake.in
@@ -0,0 +1,14 @@
+# --- Set the environment variables need by the package VP1Algs ---
+# rbianchi@cern.ch - Nov 2016
+
+# Set the environment variables
+
+
+set( VP1ALGSENVIRONMENT_ENVIRONMENT  
+    FORCESET VP1PLUGINPATH @BUILD_DIR@/lib
+    )
+
+# Silently declare the module found
+set( VP1ALGSENVIRONMENT_FOUND TRUE )
+
+
diff --git a/graphics/VP1/VP1Algs/share/vp1.py b/graphics/VP1/VP1Algs/share/vp1.py
index c7096c3e17932d417b0cdb21cc2e67274fba6090..6501cf798e15013fb232a35a6475a5b495de0505 100755
--- a/graphics/VP1/VP1Algs/share/vp1.py
+++ b/graphics/VP1/VP1Algs/share/vp1.py
@@ -87,7 +87,8 @@ if (vp1InputFiles == []):
 
     # # Set geometry version
     if (not "DetDescrVersion" in dir()):
-        DetDescrVersion = "ATLAS-GEO-20-00-01"
+        #DetDescrVersion = "ATLAS-GEO-20-00-01" # old
+        DetDescrVersion = "ATLAS-R2-2015-03-01-00" # for the new Rel. 21
     globalflags.DetDescrVersion = DetDescrVersion
     
     # Set conditions tag
diff --git a/graphics/VP1/VP1Algs/src/VP1Alg.cxx b/graphics/VP1/VP1Algs/src/VP1Alg.cxx
index a45bee38229a0a5abbb5d1666b101936519bc627..12f5a7bde48ed547f3f1a299a2e0b9ba7fe20bd5 100755
--- a/graphics/VP1/VP1Algs/src/VP1Alg.cxx
+++ b/graphics/VP1/VP1Algs/src/VP1Alg.cxx
@@ -75,12 +75,12 @@ VP1Alg::~VP1Alg()
 //____________________________________________________________________
 StatusCode VP1Alg::initialize()
 {
-  msg(MSG::INFO) << " in initialize() " << endreq;
+  msg(MSG::INFO) << " in initialize() " << endmsg;
 
   //ToolSvc
   StatusCode status = service("ToolSvc",m_toolSvc);
   if (status.isFailure()||!m_toolSvc) {
-    msg(MSG::ERROR) << " Unable to get ToolSvc!" << endreq;
+    msg(MSG::ERROR) << " Unable to get ToolSvc!" << endmsg;
     return status;
   }
 
@@ -98,13 +98,13 @@ StatusCode VP1Alg::initialize()
   status = service("IncidentSvc", incsvc, true);
 
   if(status.isFailure() || incsvc==0) {
-    msg(MSG::WARNING) << "Unable to get IncidentSvc! MF mechanism is disabled" << endreq;
+    msg(MSG::WARNING) << "Unable to get IncidentSvc! MF mechanism is disabled" << endmsg;
     return StatusCode::SUCCESS;
   }
 
   std::string endfilekey("EndTagFile");
   incsvc->addListener(this, endfilekey, 0);
-  msg(MSG::DEBUG) << "Added listener on "<<endfilekey << endreq;
+  msg(MSG::DEBUG) << "Added listener on "<<endfilekey << endmsg;
   
   //Create VP1 gui object and see if it considers settings to be valid.
   m_vp1gui = new VP1Gui(&(*evtStore()),&(*detStore()),serviceLocator(),m_toolSvc,
@@ -126,7 +126,7 @@ StatusCode VP1Alg::initialize()
 //____________________________________________________________________
 StatusCode VP1Alg::execute()
 {
-  msg(MSG::DEBUG) <<" in execute() " << endreq;
+  msg(MSG::DEBUG) <<" in execute() " << endmsg;
 
   if (!m_vp1gui)
     return StatusCode::FAILURE;
@@ -142,7 +142,7 @@ StatusCode VP1Alg::execute()
 	const uint64_t eventNumber = evt->event_ID()->event_number();
     int runNumber = evt->event_ID()->run_number();
     msg(MSG::DEBUG) << " Got run number = " << runNumber
-	<< ", event number = " << eventNumber << endreq;
+	<< ", event number = " << eventNumber << endmsg;
     // Get time stamp:
     unsigned time = evt->event_ID()->time_stamp();//0 means no info.
 
@@ -153,12 +153,12 @@ StatusCode VP1Alg::execute()
     if (m_noGui||m_vp1gui->executeNewEvent(runNumber,eventNumber,trigType,time)) {
       return StatusCode::SUCCESS;
     } else {
-      msg(MSG::INFO) << " Ending application gracefully." << endreq;
+      msg(MSG::INFO) << " Ending application gracefully." << endmsg;
       return StatusCode::FAILURE;
     }
   };
 
-  msg(MSG::WARNING) << " Unable to retrieve EventInfo from StoreGate. Skipping" << endreq;
+  msg(MSG::WARNING) << " Unable to retrieve EventInfo from StoreGate. Skipping" << endmsg;
   return StatusCode::SUCCESS;
 
 }
@@ -166,7 +166,7 @@ StatusCode VP1Alg::execute()
 //____________________________________________________________________
 StatusCode VP1Alg::finalize()
 {
-  msg(MSG::INFO) <<" in finalize() " << endreq;
+  msg(MSG::INFO) <<" in finalize() " << endmsg;
 
   if (!m_vp1gui)
     return StatusCode::FAILURE;
@@ -181,35 +181,35 @@ StatusCode VP1Alg::finalize()
 //____________________________________________________________________
 void VP1Alg::handle(const Incident& inc)
 {
-  msg(MSG::INFO) << "Handling incident '" << inc.type() << "'" << endreq;
+  msg(MSG::INFO) << "Handling incident '" << inc.type() << "'" << endmsg;
 
   if (!m_vp1gui) {
-    msg(MSG::INFO) << "Aborting due to null VP1Gui pointer." << endreq;
+    msg(MSG::INFO) << "Aborting due to null VP1Gui pointer." << endmsg;
     return;
   }
 
   const FileIncident* fileInc  = dynamic_cast<const FileIncident*>(&inc);
   if(fileInc == 0) {
-    msg(MSG::WARNING) << " Unable to cast to file incident" << endreq;
+    msg(MSG::WARNING) << " Unable to cast to file incident" << endmsg;
     return;
   }
   else
-    msg(MSG::DEBUG) << " Casting to file incident successful" << endreq;
+    msg(MSG::DEBUG) << " Casting to file incident successful" << endmsg;
 
   // Locate the EventSelector
   ServiceHandle<IEvtSelector> pEvtSelector("EventSelector", this->name());
   StatusCode sc = pEvtSelector.retrieve();
 
   if(!sc.isSuccess() || 0 == pEvtSelector) {
-    msg(MSG::WARNING) << "Could not find EventSelector" << endreq;
+    msg(MSG::WARNING) << "Could not find EventSelector" << endmsg;
     return;
   }
   else
-    msg(MSG::DEBUG) << " Got EventSelector" << endreq;
+    msg(MSG::DEBUG) << " Got EventSelector" << endmsg;
 
   IProperty* propertyServer = dynamic_cast<IProperty*>(pEvtSelector.operator->());
   if (!propertyServer) {
-    msg(MSG::WARNING) << "Could not get propertyServer" << endreq;
+    msg(MSG::WARNING) << "Could not get propertyServer" << endmsg;
     return;
   }
 
@@ -218,11 +218,11 @@ void VP1Alg::handle(const Incident& inc)
 
   sc = propertyServer->getProperty(&inputCollections);
   if(!sc.isSuccess()) {
-    msg(MSG::INFO) << "Could not get InputCollections property" << endreq;
+    msg(MSG::INFO) << "Could not get InputCollections property" << endmsg;
     return;
   }
   else
-    msg(MSG::DEBUG) << " Got InputCollections property" << endreq;
+    msg(MSG::DEBUG) << " Got InputCollections property" << endmsg;
 
   std::vector<std::string>::const_iterator iter = inputCollections.value().begin();
   std::vector<std::string>::const_iterator last = inputCollections.value().end();
@@ -237,12 +237,12 @@ void VP1Alg::handle(const Incident& inc)
     if (strNewFileName.empty())
       return;
     if (!VP1FileUtilities::fileExistsAndReadable(strNewFileName)) {
-      msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: "<<strNewFileName<<". Ending." << endreq;
+      msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: "<<strNewFileName<<". Ending." << endmsg;
       return;
     }
 
     vect.push_back(strNewFileName);
-    msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endreq;
+    msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endmsg;
   } 
   else {
     std::vector<std::string> strNewFileNames = m_vp1gui->userRequestedFiles();
@@ -251,19 +251,19 @@ void VP1Alg::handle(const Incident& inc)
       if (strNewFileName.empty())
 	continue;
       if (!VP1FileUtilities::fileExistsAndReadable(strNewFileName)) {
-	msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: " << strNewFileName << endreq;
+	msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: " << strNewFileName << endmsg;
 	continue;
       }
       vect.push_back(strNewFileName);
-      msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endreq;
+      msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endmsg;
     }
   }
 
   StringArrayProperty newInputCollections("InputCollections", vect);
 
   if(propertyServer->setProperty(newInputCollections)!=StatusCode::SUCCESS)
-    msg(MSG::WARNING) << "Could not set new InputCollections property" << endreq;
+    msg(MSG::WARNING) << "Could not set new InputCollections property" << endmsg;
   else
-    msg(MSG::DEBUG) << " InputCollections property set" << endreq;
+    msg(MSG::DEBUG) << " InputCollections property set" << endmsg;
 }